//
//  ModelOfDiscount_topic.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/8.
//  Copyright © 2016年 KX. All rights reserved.
//
#import "ModelOfDiscount_topicList.h"
#import "ModelOfDiscount_topic.h"

@implementation ModelOfDiscount_topic
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr = [NSMutableArray array];
    if ([key isEqualToString:@"topic"]) {
        self.title = [value objectForKey:@"title"];
        self.photo = [value objectForKey:@"photo"];
        self.link_url = [value objectForKey:@"link_url"];
    }if ([key isEqualToString:@"list"]) {
        for (NSDictionary *dic in value) {
            ModelOfDiscount_topicList *model = [ModelOfDiscount_topicList modelWithDic:dic];
            [arr addObject:model];
        }
        self.list = arr;
    }
}
@end
